import { Module } from '@nestjs/common'
import { ConfigModule } from '@nestjs/config'
import { JwtModule } from '@nestjs/jwt'
import { AppController } from './app.controller'
import { AppService } from './app.service'
import configuration from './config/configuration'
import { AuthModule } from './modules/auth/auth.module'
import { DataParserModule } from './modules/data-parser/data-parser.module'
import { CustomLoggerModule } from './services/custom-logger'
@Module({
    imports: [
        JwtModule.register({
            global: true,
            secret: configuration().tokenSecret,
            signOptions: {}
        }),
        CustomLoggerModule,
        ConfigModule.forRoot({
            load: [configuration],
            isGlobal: true
        }),
        DataParserModule,
        AuthModule
    ],
    controllers: [AppController],
    providers: [AppService]
})
export class AppModule {}
